Program invocation methods and devices utilizing the same

ABSTRACT

An electronic device comprises a first operating system, another second operating system, a first application, an emulator, a switch, and a processor. The first application is executable on the second operating system. The emulator imitates the runtime environment of the second operating system while the first operating system is running. The switch generates a first signal. The processor determines to which application the switch corresponds based on the first signal while the first operating system is running. When determining that the first application corresponds to the switch, the processor automatically executes the first application utilizing the emulator, whereby the first application is executable while the first operating system is running.

BACKGROUND

The invention relates to computer techniques, and in particular, toprogram invocation methods and devices utilizing the same.

Unlike general-purpose computers, an embedded system typically has amicro operating system (OS) stored on a chip rather than on a hard disk.Exemplary embedded systems comprise televisions, disc players, radios,information appliance, and others. Linux is a suitable OS for embeddedsystem as it has the advantages of small kernel, short boot time, andstable performance.

In the case of an embedded system integrated into a personal computer, aseparate micro OS (e.g. Linux) of the embedded system can boot quicklyand serve as a multimedia player without requiring booting of the majorOS (such as Windows) of the personal computer. If an application of themajor OS is required execution, the personal computer must boot with themajor OS while the micro OS of the embedded system is running. Thebooting procedure, however, is time consuming.

SUMMARY

Accordingly, program invocation methods and devices utilizing the sameare provided. An exemplary embodiment of the electronic device comprisesa first operating system, another second operating system, a firstapplication, an emulator, a switch, and a processor. The firstapplication is executable by the second operating system. The emulatorimitates the runtime environment of the second operating system in theruntime environment of the first operating system. The switch generatesa first signal. The processor determines to which application the switchcorresponds to in the runtime environment of the first operating systembased on the first signal. Upon determining that the first applicationcorresponds to the switch, the processor automatically executes thefirst application utilizing the emulator, whereby the first applicationis executable while the first operating system is running.

An exemplary embodiment of the program invocation method is implementedin an electronic device comprising a first operating system, anothersecond operating system, a first application, an emulator, a switch, anda processor. The first application is executable on the second operatingsystem. The emulator imitates the runtime environment of the secondoperating system in the runtime environment of the first operatingsystem. When the switch generates a first signal, the processordetermines to which application the switch corresponds in the runtimeenvironment of the first operating system based on the first signal.Upon determining that the first application corresponds to the switch,the processor automatically executes the first application utilizing theemulator, whereby the first application is executable while the firstoperating system is running.

An exemplary embodiment of the program invocation method is implementedin an electronic device comprising a first operating system, anothersecond operating system, a first application, an emulator, and aprocessor. The first application is executable by the second operatingsystem. The emulator imitates the runtime environment of the secondoperating system in the runtime environment of the first operatingsystem. When a Graphical User Interface (GUI) element of the firstoperating system is selected, a first signal is generated. The processordetermines to which application the GUI element corresponds in theruntime environment of the first operating system based on the firstsignal. Upon determining that the first application corresponds to theGUI element, the processor automatically executes the first applicationutilizing the emulator, whereby the first application is executablewhile the first operating system is running.

DESCRIPTION OF THE DRAWINGS

The invention can be more fully understood by reading the subsequentdetailed description and examples with references made to theaccompanying drawings, wherein:

FIG. 1 is a block diagram of an exemplary embodiment of an electronicdevice;

FIG. 2 is a flowchart of an exemplary embodiment of the programinvocation method; and

FIG. 3 is a flowchart of exemplary program termination steps.

DETAILED DESCRIPTION

Program invocation methods and devices utilizing the same are provided,whereby one of two different OS installed on a computer can invoke anapplication of the other OS in response to the operation of a switch.

In computer 10 shown in FIG. 1, processor 1 is coupled to input deviceB, applications A1˜An, applications C1˜Cn, memory 4, OS 21, emulator 22,and OS 31. For the sake of simplicity, applications A1˜An arerepresented by group A, and applications C1˜Cn are represented by groupC. For example, OS 21 is dedicated to multimedia functions, such as TVor radio reception, and CD and/or DVD playback. Applications A1˜An andC1˜Cn, OS 21, emulator 22, and OS 31 can be stored in different storagedevices (such as hard disks, chips, or flash memories), or differentpartitions of a hard disk. Some applications can be stored in the samepartition. For example, emulator 22 and OS 21 may be stored in apartition while OS 31 and applications A1˜An are stored in anotherpartition. Computer 10 may be an embedded system with chips storing OS21 and/or 31.

Os 31 is different from OS 21. Applications A1˜An are designed to run onOS 31 while applications C1˜Cn are designed to run on OS 21. Emulator 22imitates the runtime environment of OS 31 during run time of OS 21. Forexample, OS 21 and 31 may be respectively the Linux and the Windows OS,and emulator 22 can be the Wine program simulating Windows OS andenabling certain applications of the Windows OS executable in the theruntime environment of the Linux OS.

Switches B1˜Bn can be operated to generate signals. Processor 1identifies the signals. Each switch B1˜Bn corresponds to one of theapplications A1˜An, wherein the correspondence therebetween representedby relationships R1˜Rn shown in FIG. 1 may be stored in a storage deviceor a memory of computer 10. Switches B1˜Bn may be buttons or other inputdevices. For example, a switch Bi (wherein i is an integer, and 1≦i≦n)of switches B1˜Bn has two states, enters to a first state when pressedonce, and returns to a second state when pressed again. The switch Bigenerates a program invocation signal (such as signal 2 in FIG. 1) whenchanging from the second state to the first state, and generates aprogram termination signal (such as signal 3 in FIG. 1) when changingfrom the first state to the second state. In another example, a switchBj (wherein j is an integer, and 1≦j≦n) of switches B1˜Bn generates aprogram invocation signal when changing its position for the first time,and generates a program termination signal when changing its positionfor the second time. Note that OS 21 may also provide a plurality ofGraphical User Interface (GUI) elements corresponding to applicationsA1˜An. When one of the GUI elements is selected, processor 1automatically generates a signal for initiating or terminating anapplication corresponding to the GUI element.

An exemplary program invocation procedure is now described in detailwith reference to FIG. 2.

First, when computer 10 boots up (step S1), which OS is to be booted isdetermined (step S2). When determining to boot OS 31, processor 1 loadsOS 31 to memory 4 (step S10). When determining to boot OS 21, processor1 loads OS 21 to memory 4 (step S3) and executes OS 21 (step S4).

The switch Bi of switches B1˜Bn is operated to generate signal 2 (stepS5). Processor 1 receives signal 2 (step S6), and automatically performsthe following steps: determining an application Ai corresponding to theswitch Bi in response to signal 2 according to a relationship Ri ofrelationships R1˜Rn (step S7); retrieving the executable file path ofthe application Ai (step S8); executing the application Ai in theruntime environment of OS 21 utilizing emulator 22 (step S9). Table 1 isan example of relationships R1˜Rn: TABLE 1 Signal IdentificationExecutable File Path Relationship (ID) number (file name included) R1 IDnumber I1 Path P1 R2 ID number I2 Path P2 . . . . . . . . . Rn ID numberIn Path Pn

Table 1 may be stored in a storage device of computer 10. When switch B2generates signal 2 comprising ID number I2, processor 1 receives signal2, extracts ID number I2 therefrom in steps S7 and S8, searches table 1for ID number I2, and retrieves relationship R2 and executable file pathP2 of application A2 corresponding to switch B2. In step S9, processor 1executes application A2 utilizing emulator 22 based on path P2. Forexample, application A2 is a network communication program, such as aweb browser or others.

An exemplary application termination process is detailed in thefollowing with reference to FIG. 3.

When switch Bi generates signal 3 while application Ai initiated in step9 is running (step S16), processor 1 receives signal 3 (step S18),determines that application Ai corresponds to switch Bi based on signal3 and relationship Ri of relationships R1˜Rn (step S20), and terminatesapplication Ai in response to signal 3 (step S22).

For example, when application A2 is still in execution, processor 1terminates application A2 in response to signal 3 generated by switchB2. Similarly, switches B1˜Bn can respectively trigger correspondingapplications A1˜An.

Note that two separate buttons respectively triggering and terminatingan application can be used to replace a single switch describedpreviously.

While the invention has been described by way of example and in terms ofpreferred embodiment, it is to be understood that the invention is notlimited thereto. To the contrary, it is intended to cover variousmodifications and similar arrangements (as would be apparent to thoseskilled in the art) . Therefore, the scope of the appended claims shouldbe accorded the broadest interpretation so as to encompass all suchmodifications and similar arrangements.

1. A electronic device, comprising: a first operating system; a secondoperating system different from the first operating system; a firstapplication executable by the second operating system; an emulatorimitating the runtime environment of the second operating system whilethe first operating system is running; a switch generating a firstsignal; a processor determining to which application the switchcorresponds while the first operating system is running based on thefirst signal, and, upon determining that the first applicationcorresponds to the switch, automatically executing the first applicationutilizing the emulator, whereby the first application is executablewhile the first operating system is running.
 2. The device as claimed inclaim 1, wherein the processor terminates the first applicationaccording to a second signal generated by the switch.
 3. The device asclaimed in claim 1, wherein the switch comprises a button.
 4. The deviceas claimed in claim 1, wherein the first operating system is dedicatedto playing multimedia files.
 5. The device as claimed in claim 1,wherein the electronic device stores the correspondence of the switchand the first application and executes the first application based onthe first signal and the correspondence.
 6. The device as claimed inclaim 1, wherein the processor automatically retrieves executable filepath of the first application.
 7. The device as claimed in claim 1,wherein the first operating system is the Linux operating system.
 8. Thedevice as claimed in claim 1, wherein the second operating system is theWindows operating system.
 9. The device as claimed in claim 1, whereinthe emulator is the Wine program.
 10. A program invocation method,implemented in an electronic device comprising a first operating system,another second operating system, a first application, an emulator, aswitch, and a processor, wherein the first application is executable onthe second operating system, and the emulator imitates the runtimeenvironment of the second operating system in the runtime environment ofthe first operating system, comprising: executing the first operatingsystem by the processor; when the switch generates a first signal,determining, by the processor, to which application the switchcorresponds while the first operating system is running; and when thefirst application corresponds to the switch, automatically executing thefirst application utilizing the emulator, whereby the first applicationis executable while the first operating system is running.
 11. Themethod as claimed in claim 10, wherein the processor terminates thefirst application according to a second signal generated by the switch.12. The method as claimed in claim 10, wherein the electronic devicestores the correspondence of the switch and the first application, themethod further comprising executing the first application based on thefirst signal.
 13. The method as claimed in claim 10, wherein theprocessor automatically retrieves executable file path of the firstapplication.
 14. The method as claimed in claim 10, wherein the firstoperating system is the Linux operating system.
 15. The method asclaimed in claim 10, wherein the second operating system is the Windowsoperating system.
 16. The method as claimed in claim 10, wherein theemulator is the Wine program.
 17. A program invocation method,implemented in an electronic device comprising a first operating system,another second operating system, a first application, an emulator, and aprocessor, wherein the first application is executable on the secondoperating system, and the emulator imitates the runtime environment ofthe second operating system while the first operating system is running,comprising: executing the first operating system by the processor; whena Graphical User Interface (GUI) element of the first operating systemis selected, generating a first signal; determining, by the processor,to which application the GUI element corresponds while the firstoperating system is running based on the first signal; and when thefirst application corresponds to the GUI element, automaticallyexecuting the first application utilizing the emulator, whereby thefirst application is executable while the first operating system isrunning.
 18. The method as claimed in claim 17, wherein the firstoperating system is the Linux operating system.
 19. The method asclaimed in claim 17, wherein the second operating system is the Windowsoperating system.
 20. The method as claimed in claim 17, wherein theemulator is the Wine program.